package io.first_acquaintance;

/**
 * @author haomin
 * @date 2022/05/08 15:54
 **/

import java.io.File;

public class Main1 {
    public static void main(String[] args) {
        {
            File file = new File("D:\\课程\\2022-05-08-Java19-22班-IO\\陈沛鑫.txt");
            System.out.println(file);
            // 对象存在
            // 文件并不存在
        }

        {
            // 父结点，一般都是目录
            File parent = new File("D:\\课程\\2022-05-08-Java19-22班-IO");
            File file = new File(parent, "陈沛鑫.txt");
            System.out.println(file);
        }

        {
            // 父结点，一般都是目录
            File file = new File("D:\\课程\\2022-05-08-Java19-22班-IO", "陈沛鑫.txt");
            System.out.println(file);
        }

        {
            File file = new File("D:/课程/2022-06-07-IO");
            File child = new File(file,"尚明亮");
            System.out.println(child);
        }
    }
}